{if !$date.already_included}
<script type="text/javascript" src="{$ROOT_DIR}includes/js/ui.datepicker.js"></script>
{/if}
{literal}
<script type="text/javascript">
$(function() {
	$('#{/literal}{$date.name}{literal}').datepicker({ dateFormat: {/literal}'{$date.format}'{literal} });
});
</script>
{/literal}
<input type="text" name="form[{$date.name}]" id="{$date.name}" value="{$date.input}" maxlength="16" />